import 'package:flutter/widgets.dart';

class EventStatusTag extends StatelessWidget {
  final num? status;
  const EventStatusTag({super.key, this.status});
  @override
  Widget build(BuildContext context) {
    double fontSize = 12;
    double width = 50;
    double height = 22;
    // 事件状态 0未处理 1已处理 2误报
    if (status == 0) {
      return Container(
        width: width,
        height: height,
        alignment: Alignment.center,
        decoration: BoxDecoration(
          border: Border.all(
            color: const Color(0xFFFF2525),
          ),
          borderRadius: BorderRadius.circular(5),
        ),
        child: Text(
          "未处理",
          style: TextStyle(
            color: const Color(0xFFFF2525),
            fontSize: fontSize,
            height: 1,
          ),
        ),
      );
    } else if (status == 1) {
      return Container(
        width: width,
        height: height,
        alignment: Alignment.center,
        decoration: BoxDecoration(
          border: Border.all(
            color: const Color(0xFF27B148),
          ),
          borderRadius: BorderRadius.circular(5),
        ),
        child: Text(
          "已处理",
          style: TextStyle(
            color: const Color(0xFF27B148),
            fontSize: fontSize,
            height: 1,
          ),
        ),
      );
    } else if (status == 2) {
      return Container(
        width: width,
        height: height,
        alignment: Alignment.center,
        decoration: BoxDecoration(
          border: Border.all(
            color: const Color(0xFF0055A4),
          ),
          borderRadius: BorderRadius.circular(5),
        ),
        child: Text(
          "误报",
          style: TextStyle(
            color: const Color(0xFF0055A4),
            fontSize: fontSize,
            height: 1,
          ),
        ),
      );
    } else {
      return Container();
    }
  }
}
